bash : check Audio file duration

$ ffmpeg -i TTS-TNM@2-PG4-all.aiff 2>&1 | grep Duration

  Duration: 00:02:11.09, start: 0.000000, bitrate: 352 kb/s

 

$ afinfo TTS-TNM@2-PG4-all.aiff | awk '/estimated duration/ { print $3 }'

131.089070

 

$ afinfo TTS-TNM@2-PG4-all.aiff | awk '/estimated duration/ { print $3 }' | paste -sd+ - | bc | awk '{printf("%d:%02d:%02d:%02d\n",($1/60/60/24),($1/60/60%24),($1/60%60),($1%60))}'

0:00:02:11